package com.zj.study.utils.validation.validator.empty;

import com.zj.study.utils.validation.annotation.ValidateSupport;
import java.util.Collection;
import org.springframework.lang.NonNull;

/**
 * @author 谭耀飞
 * @since 2020.11.0
 */
@ValidateSupport(Collection.class)
public class NotEmptyValidatorForCollection extends AbstractNotEmptyValidator<Collection<?>> {

  @Override
  boolean compare(@NonNull Collection<?> value) {
    return !value.isEmpty();
  }

}
